import * as types from './actionTypes'

export default (state = {
  history: null,
  cms: {}
}, action) => {
  const newState = JSON.parse(JSON.stringify(state))
  switch (action.type) {
    case types.UPDATE_HISTORY:
      newState.history = action.history
      return newState
    case types.UPDATE_SERVICEINFO:
      newState.cms = action.data
      console.log('系统信息', newState.cms)
      return newState
    default:
      return state
  }
}
